<%
  course = @issued_certificate.certificate.course
  user = @issued_certificate.user
  link = issued_certificate_url(serial_number: @issued_certificate.serial_number)
%>

<% content_for(:title_button_link, link) %>

<% content_for :salutation do %>
  <%= t("shared.salutation_name", name: user.name) %>
<% end %>

<% content_for :body do %>
  <p>
    <b><%= t("mailers.issued_certificate.issued.body.congratulations") %></b>
  </p>

  <p>
    <%= t("mailers.issued_certificate.issued.body.awarded_certificate_html", course_name: course.name) %>
  </p>

  <p>
    <%= t("mailers.issued_certificate.issued.body.issued_on_html", issued_certificate: @issued_certificate.created_at.strftime('%b %e, %l:%M %p'), link_to: link_to(t("mailers.issued_certificate.issued.body.link_to"), link)) %>
  </p>

  <%= render 'mailers/link_fallback', url: link %>
<% end %>
